package cn.sh.yhk.controller.basic;

import cn.sh.yhk.service.basic.RoleService;
import cn.sh.yhk.vo.BasicVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Api(tags = "角色模块")
@Controller
@ResponseBody
@RequestMapping("/role")
public class RoleController {

    @Resource
    RoleService roleService;

//    @ApiOperation(value = "创建用户组", notes = "创建用户组")
//    @PostMapping("/create")
//    BasicVo createUser(SRole sRole) {
//        return roleService.createGroup(sRole);
//    }
//
//    @ApiOperation(value = "删除用户组", notes = "删除用户组")
//    @PostMapping("/delete")
//    BasicVo deleteUser(SRole sRole) {
//        return roleService.deleteGroup(sRole.getId().longValue());
//    }

    @ApiOperation(value = "获取用户组", notes = "获取用户组")
    @PostMapping("/getAll")
    BasicVo getAllGroup() {
        return roleService.getList();
    }
}
